﻿using BusinessLogicLayer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PresentationLayer
{
    public partial class frmChiTietNghiPhep : Form
    {
        public frmChiTietNghiPhep(NghiPhep np)
        {
            InitializeComponent();
            Text = "Thông tin nghỉ phép có mã: " + np.MaNghiPhep;
            txtMaNghiPhep.Text = np.MaNghiPhep.ToString();
            dtiNgayDiLam.Value = np.NgayDiLam;
            dtiNgayNghi.Value = np.NgayNghi;
            txtLyDo.Text = np.LyDo;

            txtMaNhanVien.Text = np.MaNhanVien;
            txtHoTen.Text = np.NhanVien.HoTen;
            if (np.NhanVien.GioiTinh == true)
                radNam.Checked = true;
            else
                radNu.Checked = false;
            dtiNgaySinh.Value = np.NhanVien.NgaySinh;
            txtDiaChi.Text = np.NhanVien.DiaChi;
            txtEmail.Text = np.NhanVien.Email;
            txtChucVu.Text = np.NhanVien.TenChucVu;
        }
    }
}
